package com.charger.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.charger.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.charger.mapper.ChargerOperationMapper;
import com.charger.domain.ChargerOperation;
import com.charger.service.IChargerOperationService;

/**
 * 统计每日充电信息Service业务层处理
 * 
 * @author Qinkunpeng
 * @date 2024-11-22
 */
@Service
public class ChargerOperationServiceImpl extends ServiceImpl<ChargerOperationMapper, ChargerOperation> implements IChargerOperationService
{
    @Autowired
    private ChargerOperationMapper chargerOperationMapper;

    /**
     * 查询统计每日充电信息
     * 
     * @param opId 统计每日充电信息主键
     * @return 统计每日充电信息
     */
    @Override
    public ChargerOperation selectChargerOperationByOpId(Long opId)
    {
        return chargerOperationMapper.selectChargerOperationByOpId(opId);
    }

    /**
     * 查询统计每日充电信息列表
     * 
     * @param chargerOperation 统计每日充电信息
     * @return 统计每日充电信息
     */
    @Override
    public List<ChargerOperation> selectChargerOperationList(ChargerOperation chargerOperation)
    {
        return chargerOperationMapper.selectChargerOperationList(chargerOperation);
    }

    /**
     * 新增统计每日充电信息
     * 
     * @param chargerOperation 统计每日充电信息
     * @return 结果
     */
    @Override
    public int insertChargerOperation(ChargerOperation chargerOperation)
    {
        chargerOperation.setCreateTime(DateUtils.getNowDate());
        return chargerOperationMapper.insertChargerOperation(chargerOperation);
    }

    /**
     * 修改统计每日充电信息
     * 
     * @param chargerOperation 统计每日充电信息
     * @return 结果
     */
    @Override
    public int updateChargerOperation(ChargerOperation chargerOperation)
    {
        return chargerOperationMapper.updateChargerOperation(chargerOperation);
    }

    /**
     * 批量删除统计每日充电信息
     * 
     * @param opIds 需要删除的统计每日充电信息主键
     * @return 结果
     */
    @Override
    public int deleteChargerOperationByOpIds(Long[] opIds)
    {
        return chargerOperationMapper.deleteChargerOperationByOpIds(opIds);
    }

    /**
     * 删除统计每日充电信息信息
     * 
     * @param opId 统计每日充电信息主键
     * @return 结果
     */
    @Override
    public int deleteChargerOperationByOpId(Long opId)
    {
        return chargerOperationMapper.deleteChargerOperationByOpId(opId);
    }


}
